$J(function() {
	$J(".accept").click(function() {
		var accept = $J(this).attr("data-val");
		var orderId = $J("input[name=orderId]").val();
		 f_accept(accept,orderId);
	});
});
function f_accept(accept,orderId){
	var params={};
	params.accept=accept;
	params.orderId=orderId;
	$J.ajax({
		type : 'post',
		url : window.baseUrl + "/order/course/accept.jsx",
		data : params,
		dataType : 'json',
		success : function(data) {
			if(data.status==false){
				 alert(data.msg);
			}else{
				 alert("接受成功");
			}
			window.location.reload();
		},
	});
}